package com.buyingtickets.service.impl;

import com.buyingtickets.dao.CarriageInformationDao;
import com.buyingtickets.service.CarriageInformationService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * @author bwj
 * @date 2021/6/24 9:09
 */
@Service
public class CarriageInformationServiceImpl implements CarriageInformationService {
    @Autowired
    private CarriageInformationDao carriageInformationDao;

    @Override
    public boolean addCarriage(int crow, int ccol, int ctype) {
        if (crow > 0 && ccol > 0 && ctype > 0) {
            return carriageInformationDao.addCarriage(crow, ccol, ctype);
        }
        return false;
    }

    @Override
    public int queryCinfoIDLast() {
        return carriageInformationDao.queryCinfoIDLast();
    }
}
